<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679686227"><span id="local-6989586621679686228"><span id="local-6989586621679686229"><span id="local-6989586621679686230"><span id="local-6989586621679686231"><span id="local-6989586621679686232"><span id="local-6989586621679686233"></span></span></span></span></span></span></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Distribution.Simple.Compiler</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  Isaac Jones 2003-2004</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  cabal-devel@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-12"></span><span class="hs-comment">--</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- This should be a much more sophisticated abstraction than it is. Currently</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- it's just a bit of data about the compiler, like its flavour and name and</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- version. The reason it's just data is because currently it has to be in</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- 'Read' and 'Show' so it can be saved along with the 'LocalBuildInfo'. The</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- only interesting bit of info it contains is a mapping between language</span><span>
</span><span id="line-18"></span><span class="hs-comment">-- extensions and compiler command line flags. This module also defines a</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- 'PackageDB' type which is used to refer to package databases. Most compilers</span><span>
</span><span id="line-20"></span><span class="hs-comment">-- only know about a single global package collection but GHC has a global and</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- per-user one and it lets you create arbitrary other package databases. We do</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- not yet fully support this latter feature.</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Simple.Compiler</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Haskell implementations</span></span><span>
</span><span id="line-26"></span><span>        </span><span class="hs-keyword">module</span><span> </span><span class="annot"><a href="Distribution.Compiler.html"><span class="hs-identifier">Distribution.Compiler</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier">Compiler</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#showCompilerId"><span class="hs-identifier">showCompilerId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#showCompilerIdWithAbi"><span class="hs-identifier">showCompilerIdWithAbi</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier">compilerFlavor</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier">compilerVersion</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerCompatFlavor"><span class="hs-identifier">compilerCompatFlavor</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerCompatVersion"><span class="hs-identifier">compilerCompatVersion</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerInfo"><span class="hs-identifier">compilerInfo</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Support for package databases</span></span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier">PackageDB</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier">PackageDBStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier">registrationPackageDB</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPaths"><span class="hs-identifier">absolutePackageDBPaths</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier">absolutePackageDBPath</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Support for optimisation levels</span></span><span>
</span><span id="line-42"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier">OptimisationLevel</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToOptimisationLevel"><span class="hs-identifier">flagToOptimisationLevel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Support for debug info levels</span></span><span>
</span><span id="line-46"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier">DebugInfoLevel</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToDebugInfoLevel"><span class="hs-identifier">flagToDebugInfoLevel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Support for language extensions</span></span><span>
</span><span id="line-50"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier">CompilerFlag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#languageToFlags"><span class="hs-identifier">languageToFlags</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#unsupportedLanguages"><span class="hs-identifier">unsupportedLanguages</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-53"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#extensionsToFlags"><span class="hs-identifier">extensionsToFlags</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#unsupportedExtensions"><span class="hs-identifier">unsupportedExtensions</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#parmakeSupported"><span class="hs-identifier">parmakeSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-56"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#reexportedModulesSupported"><span class="hs-identifier">reexportedModulesSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#renamingPackageFlagsSupported"><span class="hs-identifier">renamingPackageFlagsSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#unifiedIPIDRequired"><span class="hs-identifier">unifiedIPIDRequired</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#packageKeySupported"><span class="hs-identifier">packageKeySupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#unitIdSupported"><span class="hs-identifier">unitIdSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#coverageSupported"><span class="hs-identifier">coverageSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#profilingSupported"><span class="hs-identifier">profilingSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#backpackSupported"><span class="hs-identifier">backpackSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#arResponseFilesSupported"><span class="hs-identifier">arResponseFilesSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#libraryDynDirSupported"><span class="hs-identifier">libraryDynDirSupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-66"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#libraryVisibilitySupported"><span class="hs-identifier">libraryVisibilitySupported</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span>        </span><span class="annot"><span class="hs-comment">-- * Support for profiling detail levels</span></span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier">ProfDetailLevel</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#knownProfDetailLevels"><span class="hs-identifier">knownProfDetailLevels</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToProfDetailLevel"><span class="hs-identifier">flagToProfDetailLevel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-72"></span><span>        </span><span class="annot"><a href="Distribution.Simple.Compiler.html#showProfDetailLevel"><span class="hs-identifier">showProfDetailLevel</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-73"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-77"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compiler.html"><span class="hs-identifier">Distribution.Compiler</span></a></span><span>
</span><span id="line-80"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-81"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html"><span class="hs-identifier">Language.Haskell.Extension</span></a></span><span>
</span><span id="line-82"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Utils.html"><span class="hs-identifier">Distribution.Simple.Utils</span></a></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier">lookup</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier">canonicalizePath</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span id="local-6989586621679686121"><span id="local-6989586621679686122"></span></span><span class="hs-keyword">data</span><span> </span><span id="Compiler"><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-var">Compiler</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Compiler"><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-var">Compiler</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-88"></span><span>        </span><span id="compilerId"><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span></span><span>              </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-89"></span><span>        </span><span class="hs-comment">-- ^ Compiler flavour and version.</span><span>
</span><span id="line-90"></span><span>        </span><span id="compilerAbiTag"><span class="annot"><span class="annottext">Compiler -&gt; AbiTag
</span><a href="Distribution.Simple.Compiler.html#compilerAbiTag"><span class="hs-identifier hs-var hs-var">compilerAbiTag</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#AbiTag"><span class="hs-identifier hs-type">AbiTag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-91"></span><span>        </span><span class="hs-comment">-- ^ Tag for distinguishing incompatible ABI's on the same</span><span>
</span><span id="line-92"></span><span>        </span><span class="hs-comment">-- architecture/os.</span><span>
</span><span id="line-93"></span><span>        </span><span id="compilerCompat"><span class="annot"><span class="annottext">Compiler -&gt; [CompilerId]
</span><a href="Distribution.Simple.Compiler.html#compilerCompat"><span class="hs-identifier hs-var hs-var">compilerCompat</span></a></span></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-94"></span><span>        </span><span class="hs-comment">-- ^ Other implementations that this compiler claims to be</span><span>
</span><span id="line-95"></span><span>        </span><span class="hs-comment">-- compatible with.</span><span>
</span><span id="line-96"></span><span>        </span><span id="compilerLanguages"><span class="annot"><span class="annottext">Compiler -&gt; [(Language, String)]
</span><a href="Distribution.Simple.Compiler.html#compilerLanguages"><span class="hs-identifier hs-var hs-var">compilerLanguages</span></a></span></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-97"></span><span>        </span><span class="hs-comment">-- ^ Supported language standards.</span><span>
</span><span id="line-98"></span><span>        </span><span id="compilerExtensions"><span class="annot"><span class="annottext">Compiler -&gt; [(Extension, Maybe String)]
</span><a href="Distribution.Simple.Compiler.html#compilerExtensions"><span class="hs-identifier hs-var hs-var">compilerExtensions</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-99"></span><span>        </span><span class="hs-comment">-- ^ Supported extensions.</span><span>
</span><span id="line-100"></span><span>        </span><span id="compilerProperties"><span class="annot"><span class="annottext">Compiler -&gt; Map String String
</span><a href="Distribution.Simple.Compiler.html#compilerProperties"><span class="hs-identifier hs-var hs-var">compilerProperties</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-comment">-- ^ A key-value map for properties not covered by the above fields.</span><span>
</span><span id="line-102"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-103"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679686099"><span id="local-6989586621679686112"><span class="annot"><span class="annottext">Compiler -&gt; Compiler -&gt; Bool
(Compiler -&gt; Compiler -&gt; Bool)
-&gt; (Compiler -&gt; Compiler -&gt; Bool) -&gt; Eq Compiler
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Compiler -&gt; Compiler -&gt; Bool
$c/= :: Compiler -&gt; Compiler -&gt; Bool
== :: Compiler -&gt; Compiler -&gt; Bool
$c== :: Compiler -&gt; Compiler -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. Compiler -&gt; Rep Compiler x)
-&gt; (forall x. Rep Compiler x -&gt; Compiler) -&gt; Generic Compiler
forall x. Rep Compiler x -&gt; Compiler
forall x. Compiler -&gt; Rep Compiler x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep Compiler x -&gt; Compiler
$cfrom :: forall x. Compiler -&gt; Rep Compiler x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679686072"><span id="local-6989586621679686074"><span id="local-6989586621679686090"><span class="annot"><span class="annottext">Int -&gt; Compiler -&gt; ShowS
[Compiler] -&gt; ShowS
Compiler -&gt; String
(Int -&gt; Compiler -&gt; ShowS)
-&gt; (Compiler -&gt; String) -&gt; ([Compiler] -&gt; ShowS) -&gt; Show Compiler
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Compiler] -&gt; ShowS
$cshowList :: [Compiler] -&gt; ShowS
show :: Compiler -&gt; String
$cshow :: Compiler -&gt; String
showsPrec :: Int -&gt; Compiler -&gt; ShowS
$cshowsPrec :: Int -&gt; Compiler -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679686023"><span id="local-6989586621679686055"><span id="local-6989586621679686058"><span id="local-6989586621679686060"><span class="annot"><span class="annottext">ReadPrec [Compiler]
ReadPrec Compiler
Int -&gt; ReadS Compiler
ReadS [Compiler]
(Int -&gt; ReadS Compiler)
-&gt; ReadS [Compiler]
-&gt; ReadPrec Compiler
-&gt; ReadPrec [Compiler]
-&gt; Read Compiler
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [Compiler]
$creadListPrec :: ReadPrec [Compiler]
readPrec :: ReadPrec Compiler
$creadPrec :: ReadPrec Compiler
readList :: ReadS [Compiler]
$creadList :: ReadS [Compiler]
readsPrec :: Int -&gt; ReadS Compiler
$creadsPrec :: Int -&gt; ReadS Compiler
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679686003"><span id="local-6989586621679686005"><span id="local-6989586621679686007"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span></span></span></span><span>
</span><span id="line-106"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685996"><span id="local-6989586621679685998"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span></span></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#showCompilerId"><span class="hs-identifier hs-type">showCompilerId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-109"></span><span id="showCompilerId"><span class="annot"><span class="annottext">showCompilerId :: Compiler -&gt; String
</span><a href="Distribution.Simple.Compiler.html#showCompilerId"><span class="hs-identifier hs-var hs-var">showCompilerId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">(CompilerId -&gt; String)
-&gt; (Compiler -&gt; CompilerId) -&gt; Compiler -&gt; String
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span>
</span><span id="line-110"></span><span>
</span><span id="line-111"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#showCompilerIdWithAbi"><span class="hs-identifier hs-type">showCompilerIdWithAbi</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-112"></span><span id="showCompilerIdWithAbi"><span class="annot"><span class="annottext">showCompilerIdWithAbi :: Compiler -&gt; String
</span><a href="Distribution.Simple.Compiler.html#showCompilerIdWithAbi"><span class="hs-identifier hs-var hs-var">showCompilerIdWithAbi</span></a></span></span><span> </span><span id="local-6989586621679685992"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685992"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-113"></span><span>  </span><span class="annot"><span class="annottext">CompilerId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685992"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-114"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; AbiTag
</span><a href="Distribution.Simple.Compiler.html#compilerAbiTag"><span class="hs-identifier hs-var hs-var">compilerAbiTag</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685992"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-115"></span><span>    </span><span class="annot"><span class="annottext">AbiTag
</span><a href="Distribution.Compiler.html#NoAbiTag"><span class="hs-identifier hs-var">NoAbiTag</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-116"></span><span>    </span><span class="annot"><a href="Distribution.Compiler.html#AbiTag"><span class="hs-identifier hs-type">AbiTag</span></a></span><span> </span><span id="local-6989586621679685989"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685989"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685989"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-type">compilerFlavor</span></a></span><span> </span><span class="hs-glyph">::</span><span>  </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerFlavor"><span class="hs-identifier hs-type">CompilerFlavor</span></a></span><span>
</span><span id="line-119"></span><span id="compilerFlavor"><span class="annot"><span class="annottext">compilerFlavor :: Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var hs-var">compilerFlavor</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span id="local-6989586621679685987"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685987"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685987"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CompilerId -&gt; CompilerFlavor)
-&gt; (Compiler -&gt; CompilerId) -&gt; Compiler -&gt; CompilerFlavor
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-type">compilerVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span>
</span><span id="line-122"></span><span id="compilerVersion"><span class="annot"><span class="annottext">compilerVersion :: Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var hs-var">compilerVersion</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679685986"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685986"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685986"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(CompilerId -&gt; Version)
-&gt; (Compiler -&gt; CompilerId) -&gt; Compiler -&gt; Version
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="hs-comment">-- | Is this compiler compatible with the compiler flavour we're interested in?</span><span>
</span><span id="line-126"></span><span class="hs-comment">--</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- For example this checks if the compiler is actually GHC or is another</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- compiler that claims to be compatible with some version of GHC, e.g. GHCJS.</span><span>
</span><span id="line-129"></span><span class="hs-comment">--</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- &gt; if compilerCompatFlavor GHC compiler then ... else ...</span><span>
</span><span id="line-131"></span><span class="hs-comment">--</span><span>
</span><span id="line-132"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerCompatFlavor"><span class="hs-identifier hs-type">compilerCompatFlavor</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerFlavor"><span class="hs-identifier hs-type">CompilerFlavor</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-133"></span><span id="compilerCompatFlavor"><span class="annot"><span class="annottext">compilerCompatFlavor :: CompilerFlavor -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#compilerCompatFlavor"><span class="hs-identifier hs-var hs-var">compilerCompatFlavor</span></a></span></span><span> </span><span id="local-6989586621679685985"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685985"><span class="hs-identifier hs-var">flavor</span></a></span></span><span> </span><span id="local-6989586621679685984"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685984"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685985"><span class="hs-identifier hs-var">flavor</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; CompilerFlavor -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685984"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-135"></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685985"><span class="hs-identifier hs-var">flavor</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; [CompilerFlavor] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685981"><span class="hs-identifier hs-var">flavor'</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span id="local-6989586621679685981"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685981"><span class="hs-identifier hs-var">flavor'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; [CompilerId]
</span><a href="Distribution.Simple.Compiler.html#compilerCompat"><span class="hs-identifier hs-var hs-var">compilerCompat</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685984"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-136"></span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- | Is this compiler compatible with the compiler flavour we're interested in,</span><span>
</span><span id="line-139"></span><span class="hs-comment">-- and if so what version does it claim to be compatible with.</span><span>
</span><span id="line-140"></span><span class="hs-comment">--</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- For example this checks if the compiler is actually GHC-7.x or is another</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- compiler that claims to be compatible with some GHC-7.x version.</span><span>
</span><span id="line-143"></span><span class="hs-comment">--</span><span>
</span><span id="line-144"></span><span class="hs-comment">-- &gt; case compilerCompatVersion GHC compiler of</span><span>
</span><span id="line-145"></span><span class="hs-comment">-- &gt;   Just (Version (7:_)) -&gt; ...</span><span>
</span><span id="line-146"></span><span class="hs-comment">-- &gt;   _                    -&gt; ...</span><span>
</span><span id="line-147"></span><span class="hs-comment">--</span><span>
</span><span id="line-148"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerCompatVersion"><span class="hs-identifier hs-type">compilerCompatVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerFlavor"><span class="hs-identifier hs-type">CompilerFlavor</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span>
</span><span id="line-149"></span><span id="compilerCompatVersion"><span class="annot"><span class="annottext">compilerCompatVersion :: CompilerFlavor -&gt; Compiler -&gt; Maybe Version
</span><a href="Distribution.Simple.Compiler.html#compilerCompatVersion"><span class="hs-identifier hs-var hs-var">compilerCompatVersion</span></a></span></span><span> </span><span id="local-6989586621679685980"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685980"><span class="hs-identifier hs-var">flavor</span></a></span></span><span> </span><span id="local-6989586621679685979"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685979"><span class="hs-identifier hs-var">comp</span></a></span></span><span>
</span><span id="line-150"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685979"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; CompilerFlavor -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685980"><span class="hs-identifier hs-var">flavor</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Maybe Version
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685979"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span>
</span><span id="line-152"></span><span>      </span><span class="annot"><span class="annottext">[Version] -&gt; Maybe Version
forall a. [a] -&gt; Maybe a
</span><a href="../../base/src/Data.Maybe.html#listToMaybe"><span class="hs-identifier hs-var">listToMaybe</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685977"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerId"><span class="hs-identifier hs-type">CompilerId</span></a></span><span> </span><span id="local-6989586621679685976"><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685976"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span id="local-6989586621679685977"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685977"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; [CompilerId]
</span><a href="Distribution.Simple.Compiler.html#compilerCompat"><span class="hs-identifier hs-var hs-var">compilerCompat</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685979"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685976"><span class="hs-identifier hs-var">fl</span></a></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor -&gt; CompilerFlavor -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="#local-6989586621679685980"><span class="hs-identifier hs-var">flavor</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#compilerInfo"><span class="hs-identifier hs-type">compilerInfo</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-type">CompilerInfo</span></a></span><span>
</span><span id="line-155"></span><span id="compilerInfo"><span class="annot"><span class="annottext">compilerInfo :: Compiler -&gt; CompilerInfo
</span><a href="Distribution.Simple.Compiler.html#compilerInfo"><span class="hs-identifier hs-var hs-var">compilerInfo</span></a></span></span><span> </span><span id="local-6989586621679685975"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CompilerId
-&gt; AbiTag
-&gt; Maybe [CompilerId]
-&gt; Maybe [Language]
-&gt; Maybe [Extension]
-&gt; CompilerInfo
</span><a href="Distribution.Compiler.html#CompilerInfo"><span class="hs-identifier hs-var">CompilerInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; CompilerId
</span><a href="Distribution.Simple.Compiler.html#compilerId"><span class="hs-identifier hs-var hs-var">compilerId</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; AbiTag
</span><a href="Distribution.Simple.Compiler.html#compilerAbiTag"><span class="hs-identifier hs-var hs-var">compilerAbiTag</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CompilerId] -&gt; Maybe [CompilerId]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">([CompilerId] -&gt; Maybe [CompilerId])
-&gt; (Compiler -&gt; [CompilerId]) -&gt; Compiler -&gt; Maybe [CompilerId]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; [CompilerId]
</span><a href="Distribution.Simple.Compiler.html#compilerCompat"><span class="hs-identifier hs-var hs-var">compilerCompat</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; Maybe [CompilerId]) -&gt; Compiler -&gt; Maybe [CompilerId]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Language] -&gt; Maybe [Language]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">([Language] -&gt; Maybe [Language])
-&gt; (Compiler -&gt; [Language]) -&gt; Compiler -&gt; Maybe [Language]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Language, String) -&gt; Language)
-&gt; [(Language, String)] -&gt; [Language]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Language, String) -&gt; Language
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">([(Language, String)] -&gt; [Language])
-&gt; (Compiler -&gt; [(Language, String)]) -&gt; Compiler -&gt; [Language]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; [(Language, String)]
</span><a href="Distribution.Simple.Compiler.html#compilerLanguages"><span class="hs-identifier hs-var hs-var">compilerLanguages</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; Maybe [Language]) -&gt; Compiler -&gt; Maybe [Language]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>                              </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Extension] -&gt; Maybe [Extension]
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">([Extension] -&gt; Maybe [Extension])
-&gt; (Compiler -&gt; [Extension]) -&gt; Compiler -&gt; Maybe [Extension]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">((Extension, Maybe String) -&gt; Extension)
-&gt; [(Extension, Maybe String)] -&gt; [Extension]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(Extension, Maybe String) -&gt; Extension
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">([(Extension, Maybe String)] -&gt; [Extension])
-&gt; (Compiler -&gt; [(Extension, Maybe String)])
-&gt; Compiler
-&gt; [Extension]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; [(Extension, Maybe String)]
</span><a href="Distribution.Simple.Compiler.html#compilerExtensions"><span class="hs-identifier hs-var hs-var">compilerExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">(Compiler -&gt; Maybe [Extension]) -&gt; Compiler -&gt; Maybe [Extension]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685975"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- * Package databases</span><span>
</span><span id="line-163"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span class="hs-comment">-- |Some compilers have a notion of a database of available packages.</span><span>
</span><span id="line-166"></span><span class="hs-comment">-- For some there is just one global db of packages, other compilers</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- support a per-user or an arbitrary db specified at some location in</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- the file system. This can be used to build isloated environments of</span><span>
</span><span id="line-169"></span><span class="hs-comment">-- packages, for example to build a collection of related packages</span><span>
</span><span id="line-170"></span><span class="hs-comment">-- without installing them globally.</span><span>
</span><span id="line-171"></span><span class="hs-comment">--</span><span>
</span><span id="line-172"></span><span id="local-6989586621679685972"><span id="local-6989586621679685973"></span></span><span class="hs-keyword">data</span><span> </span><span id="PackageDB"><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-var">PackageDB</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="GlobalPackageDB"><span class="annot"><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span></span><span>
</span><span id="line-173"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span id="UserPackageDB"><span class="annot"><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span></span><span>
</span><span id="line-174"></span><span>               </span><span class="hs-glyph">|</span><span> </span><span id="SpecificPackageDB"><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-var">SpecificPackageDB</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679685963"><span id="local-6989586621679685966"><span class="annot"><span class="annottext">PackageDB -&gt; PackageDB -&gt; Bool
(PackageDB -&gt; PackageDB -&gt; Bool)
-&gt; (PackageDB -&gt; PackageDB -&gt; Bool) -&gt; Eq PackageDB
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: PackageDB -&gt; PackageDB -&gt; Bool
$c/= :: PackageDB -&gt; PackageDB -&gt; Bool
== :: PackageDB -&gt; PackageDB -&gt; Bool
$c== :: PackageDB -&gt; PackageDB -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. PackageDB -&gt; Rep PackageDB x)
-&gt; (forall x. Rep PackageDB x -&gt; PackageDB) -&gt; Generic PackageDB
forall x. Rep PackageDB x -&gt; PackageDB
forall x. PackageDB -&gt; Rep PackageDB x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep PackageDB x -&gt; PackageDB
$cfrom :: forall x. PackageDB -&gt; Rep PackageDB x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685938"><span id="local-6989586621679685940"><span id="local-6989586621679685943"><span id="local-6989586621679685946"><span id="local-6989586621679685949"><span id="local-6989586621679685953"><span id="local-6989586621679685957"><span class="annot"><span class="annottext">Eq PackageDB
Eq PackageDB
-&gt; (PackageDB -&gt; PackageDB -&gt; Ordering)
-&gt; (PackageDB -&gt; PackageDB -&gt; Bool)
-&gt; (PackageDB -&gt; PackageDB -&gt; Bool)
-&gt; (PackageDB -&gt; PackageDB -&gt; Bool)
-&gt; (PackageDB -&gt; PackageDB -&gt; Bool)
-&gt; (PackageDB -&gt; PackageDB -&gt; PackageDB)
-&gt; (PackageDB -&gt; PackageDB -&gt; PackageDB)
-&gt; Ord PackageDB
PackageDB -&gt; PackageDB -&gt; Bool
PackageDB -&gt; PackageDB -&gt; Ordering
PackageDB -&gt; PackageDB -&gt; PackageDB
forall a.
Eq a
-&gt; (a -&gt; a -&gt; Ordering)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; Bool)
-&gt; (a -&gt; a -&gt; a)
-&gt; (a -&gt; a -&gt; a)
-&gt; Ord a
min :: PackageDB -&gt; PackageDB -&gt; PackageDB
$cmin :: PackageDB -&gt; PackageDB -&gt; PackageDB
max :: PackageDB -&gt; PackageDB -&gt; PackageDB
$cmax :: PackageDB -&gt; PackageDB -&gt; PackageDB
&gt;= :: PackageDB -&gt; PackageDB -&gt; Bool
$c&gt;= :: PackageDB -&gt; PackageDB -&gt; Bool
&gt; :: PackageDB -&gt; PackageDB -&gt; Bool
$c&gt; :: PackageDB -&gt; PackageDB -&gt; Bool
&lt;= :: PackageDB -&gt; PackageDB -&gt; Bool
$c&lt;= :: PackageDB -&gt; PackageDB -&gt; Bool
&lt; :: PackageDB -&gt; PackageDB -&gt; Bool
$c&lt; :: PackageDB -&gt; PackageDB -&gt; Bool
compare :: PackageDB -&gt; PackageDB -&gt; Ordering
$ccompare :: PackageDB -&gt; PackageDB -&gt; Ordering
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Ord</span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685928"><span id="local-6989586621679685930"><span id="local-6989586621679685935"><span class="annot"><span class="annottext">Int -&gt; PackageDB -&gt; ShowS
[PackageDB] -&gt; ShowS
PackageDB -&gt; String
(Int -&gt; PackageDB -&gt; ShowS)
-&gt; (PackageDB -&gt; String)
-&gt; ([PackageDB] -&gt; ShowS)
-&gt; Show PackageDB
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [PackageDB] -&gt; ShowS
$cshowList :: [PackageDB] -&gt; ShowS
show :: PackageDB -&gt; String
$cshow :: PackageDB -&gt; String
showsPrec :: Int -&gt; PackageDB -&gt; ShowS
$cshowsPrec :: Int -&gt; PackageDB -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685912"><span id="local-6989586621679685921"><span id="local-6989586621679685924"><span id="local-6989586621679685926"><span class="annot"><span class="annottext">ReadPrec [PackageDB]
ReadPrec PackageDB
Int -&gt; ReadS PackageDB
ReadS [PackageDB]
(Int -&gt; ReadS PackageDB)
-&gt; ReadS [PackageDB]
-&gt; ReadPrec PackageDB
-&gt; ReadPrec [PackageDB]
-&gt; Read PackageDB
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [PackageDB]
$creadListPrec :: ReadPrec [PackageDB]
readPrec :: ReadPrec PackageDB
$creadPrec :: ReadPrec PackageDB
readList :: ReadS [PackageDB]
$creadList :: ReadS [PackageDB]
readsPrec :: Int -&gt; ReadS PackageDB
$creadsPrec :: Int -&gt; ReadS PackageDB
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685905"><span id="local-6989586621679685907"><span id="local-6989586621679685909"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span></span></span></span><span>
</span><span id="line-178"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685899"><span id="local-6989586621679685901"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span></span></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="hs-comment">-- | We typically get packages from several databases, and stack them</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- together. This type lets us be explicit about that stacking. For example</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- typical stacks include:</span><span>
</span><span id="line-183"></span><span class="hs-comment">--</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- &gt; [GlobalPackageDB]</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- &gt; [GlobalPackageDB, UserPackageDB]</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- &gt; [GlobalPackageDB, SpecificPackageDB &quot;package.conf.inplace&quot;]</span><span>
</span><span id="line-187"></span><span class="hs-comment">--</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- Note that the 'GlobalPackageDB' is invariably at the bottom since it</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- contains the rts, base and other special compiler-specific packages.</span><span>
</span><span id="line-190"></span><span class="hs-comment">--</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- We are not restricted to using just the above combinations. In particular</span><span>
</span><span id="line-192"></span><span class="hs-comment">-- we can use several custom package dbs and the user package db together.</span><span>
</span><span id="line-193"></span><span class="hs-comment">--</span><span>
</span><span id="line-194"></span><span class="hs-comment">-- When it comes to writing, the top most (last) package is used.</span><span>
</span><span id="line-195"></span><span class="hs-comment">--</span><span>
</span><span id="line-196"></span><span class="hs-keyword">type</span><span> </span><span id="PackageDBStack"><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-var">PackageDBStack</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span class="hs-comment">-- | Return the package that we should register into. This is the package db at</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- the top of the stack.</span><span>
</span><span id="line-200"></span><span class="hs-comment">--</span><span>
</span><span id="line-201"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-type">registrationPackageDB</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-202"></span><span id="registrationPackageDB"><span class="annot"><span class="annottext">registrationPackageDB :: [PackageDB] -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#registrationPackageDB"><span class="hs-identifier hs-var hs-var">registrationPackageDB</span></a></span></span><span> </span><span id="local-6989586621679685898"><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679685898"><span class="hs-identifier hs-var">dbs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[PackageDB] -&gt; Maybe PackageDB
forall a. [a] -&gt; Maybe a
</span><a href="Distribution.Utils.Generic.html#safeLast"><span class="hs-identifier hs-var">safeLast</span></a></span><span> </span><span class="annot"><span class="annottext">[PackageDB]
</span><a href="#local-6989586621679685898"><span class="hs-identifier hs-var">dbs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-203"></span><span>  </span><span class="annot"><span class="annottext">Maybe PackageDB
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PackageDB
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;internal error: empty package db set&quot;</span></span><span>
</span><span id="line-204"></span><span>  </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679685895"><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679685895"><span class="hs-identifier hs-var">p</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="#local-6989586621679685895"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="hs-comment">-- | Make package paths absolute</span><span>
</span><span id="line-207"></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPaths"><span class="hs-identifier hs-type">absolutePackageDBPaths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDBStack"><span class="hs-identifier hs-type">PackageDBStack</span></a></span><span>
</span><span id="line-210"></span><span id="absolutePackageDBPaths"><span class="annot"><span class="annottext">absolutePackageDBPaths :: [PackageDB] -&gt; IO [PackageDB]
</span><a href="Distribution.Simple.Compiler.html#absolutePackageDBPaths"><span class="hs-identifier hs-var hs-var">absolutePackageDBPaths</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(PackageDB -&gt; IO PackageDB) -&gt; [PackageDB] -&gt; IO [PackageDB]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; IO PackageDB
</span><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier hs-var">absolutePackageDBPath</span></a></span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier hs-type">absolutePackageDBPath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#PackageDB"><span class="hs-identifier hs-type">PackageDB</span></a></span><span>
</span><span id="line-213"></span><span id="absolutePackageDBPath"><span class="annot"><span class="annottext">absolutePackageDBPath :: PackageDB -&gt; IO PackageDB
</span><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier hs-var hs-var">absolutePackageDBPath</span></a></span></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; IO PackageDB
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#GlobalPackageDB"><span class="hs-identifier hs-var">GlobalPackageDB</span></a></span><span>
</span><span id="line-214"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier hs-var">absolutePackageDBPath</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageDB -&gt; IO PackageDB
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">PackageDB
</span><a href="Distribution.Simple.Compiler.html#UserPackageDB"><span class="hs-identifier hs-var">UserPackageDB</span></a></span><span>
</span><span id="line-215"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#absolutePackageDBPath"><span class="hs-identifier hs-var">absolutePackageDBPath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-type">SpecificPackageDB</span></a></span><span> </span><span id="local-6989586621679685893"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685893"><span class="hs-identifier hs-var">db</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-216"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; PackageDB
</span><a href="Distribution.Simple.Compiler.html#SpecificPackageDB"><span class="hs-identifier hs-var">SpecificPackageDB</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; PackageDB) -&gt; IO String -&gt; IO PackageDB
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-operator hs-var">`liftM`</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; IO String
</span><a href="../../directory/src/System.Directory.html#canonicalizePath"><span class="hs-identifier hs-var">canonicalizePath</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685893"><span class="hs-identifier hs-var">db</span></a></span><span>
</span><span id="line-217"></span><span>
</span><span id="line-218"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-219"></span><span class="hs-comment">-- * Optimisation levels</span><span>
</span><span id="line-220"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-221"></span><span>
</span><span id="line-222"></span><span class="hs-comment">-- | Some compilers support optimising. Some have different levels.</span><span>
</span><span id="line-223"></span><span class="hs-comment">-- For compilers that do not the level is just capped to the level</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- they do support.</span><span>
</span><span id="line-225"></span><span class="hs-comment">--</span><span>
</span><span id="line-226"></span><span id="local-6989586621679685890"><span id="local-6989586621679685891"></span></span><span class="hs-keyword">data</span><span> </span><span id="OptimisationLevel"><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-var">OptimisationLevel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NoOptimisation"><span class="annot"><a href="Distribution.Simple.Compiler.html#NoOptimisation"><span class="hs-identifier hs-var">NoOptimisation</span></a></span></span><span>
</span><span id="line-227"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span id="NormalOptimisation"><span class="annot"><a href="Distribution.Simple.Compiler.html#NormalOptimisation"><span class="hs-identifier hs-var">NormalOptimisation</span></a></span></span><span>
</span><span id="line-228"></span><span>                       </span><span class="hs-glyph">|</span><span> </span><span id="MaximumOptimisation"><span class="annot"><a href="Distribution.Simple.Compiler.html#MaximumOptimisation"><span class="hs-identifier hs-var">MaximumOptimisation</span></a></span></span><span>
</span><span id="line-229"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679685883"><span id="local-6989586621679685885"><span class="annot"><span class="annottext">OptimisationLevel
OptimisationLevel -&gt; OptimisationLevel -&gt; Bounded OptimisationLevel
forall a. a -&gt; a -&gt; Bounded a
maxBound :: OptimisationLevel
$cmaxBound :: OptimisationLevel
minBound :: OptimisationLevel
$cminBound :: OptimisationLevel
</span><a href="../../base/src/GHC.Enum.html#Bounded"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Bounded</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685846"><span id="local-6989586621679685848"><span id="local-6989586621679685852"><span id="local-6989586621679685856"><span id="local-6989586621679685858"><span id="local-6989586621679685866"><span id="local-6989586621679685872"><span id="local-6989586621679685880"><span class="annot"><span class="annottext">Int -&gt; OptimisationLevel
OptimisationLevel -&gt; Int
OptimisationLevel -&gt; [OptimisationLevel]
OptimisationLevel -&gt; OptimisationLevel
OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
OptimisationLevel
-&gt; OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
(OptimisationLevel -&gt; OptimisationLevel)
-&gt; (OptimisationLevel -&gt; OptimisationLevel)
-&gt; (Int -&gt; OptimisationLevel)
-&gt; (OptimisationLevel -&gt; Int)
-&gt; (OptimisationLevel -&gt; [OptimisationLevel])
-&gt; (OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel])
-&gt; (OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel])
-&gt; (OptimisationLevel
    -&gt; OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel])
-&gt; Enum OptimisationLevel
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: OptimisationLevel
-&gt; OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
$cenumFromThenTo :: OptimisationLevel
-&gt; OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
enumFromTo :: OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
$cenumFromTo :: OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
enumFromThen :: OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
$cenumFromThen :: OptimisationLevel -&gt; OptimisationLevel -&gt; [OptimisationLevel]
enumFrom :: OptimisationLevel -&gt; [OptimisationLevel]
$cenumFrom :: OptimisationLevel -&gt; [OptimisationLevel]
fromEnum :: OptimisationLevel -&gt; Int
$cfromEnum :: OptimisationLevel -&gt; Int
toEnum :: Int -&gt; OptimisationLevel
$ctoEnum :: Int -&gt; OptimisationLevel
pred :: OptimisationLevel -&gt; OptimisationLevel
$cpred :: OptimisationLevel -&gt; OptimisationLevel
succ :: OptimisationLevel -&gt; OptimisationLevel
$csucc :: OptimisationLevel -&gt; OptimisationLevel
</span><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685841"><span id="local-6989586621679685843"><span class="annot"><span class="annottext">OptimisationLevel -&gt; OptimisationLevel -&gt; Bool
(OptimisationLevel -&gt; OptimisationLevel -&gt; Bool)
-&gt; (OptimisationLevel -&gt; OptimisationLevel -&gt; Bool)
-&gt; Eq OptimisationLevel
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: OptimisationLevel -&gt; OptimisationLevel -&gt; Bool
$c/= :: OptimisationLevel -&gt; OptimisationLevel -&gt; Bool
== :: OptimisationLevel -&gt; OptimisationLevel -&gt; Bool
$c== :: OptimisationLevel -&gt; OptimisationLevel -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. OptimisationLevel -&gt; Rep OptimisationLevel x)
-&gt; (forall x. Rep OptimisationLevel x -&gt; OptimisationLevel)
-&gt; Generic OptimisationLevel
forall x. Rep OptimisationLevel x -&gt; OptimisationLevel
forall x. OptimisationLevel -&gt; Rep OptimisationLevel x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep OptimisationLevel x -&gt; OptimisationLevel
$cfrom :: forall x. OptimisationLevel -&gt; Rep OptimisationLevel x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685827"><span id="local-6989586621679685832"><span id="local-6989586621679685835"><span id="local-6989586621679685837"><span class="annot"><span class="annottext">ReadPrec [OptimisationLevel]
ReadPrec OptimisationLevel
Int -&gt; ReadS OptimisationLevel
ReadS [OptimisationLevel]
(Int -&gt; ReadS OptimisationLevel)
-&gt; ReadS [OptimisationLevel]
-&gt; ReadPrec OptimisationLevel
-&gt; ReadPrec [OptimisationLevel]
-&gt; Read OptimisationLevel
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [OptimisationLevel]
$creadListPrec :: ReadPrec [OptimisationLevel]
readPrec :: ReadPrec OptimisationLevel
$creadPrec :: ReadPrec OptimisationLevel
readList :: ReadS [OptimisationLevel]
$creadList :: ReadS [OptimisationLevel]
readsPrec :: Int -&gt; ReadS OptimisationLevel
$creadsPrec :: Int -&gt; ReadS OptimisationLevel
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685820"><span id="local-6989586621679685822"><span id="local-6989586621679685824"><span class="annot"><span class="annottext">Int -&gt; OptimisationLevel -&gt; ShowS
[OptimisationLevel] -&gt; ShowS
OptimisationLevel -&gt; String
(Int -&gt; OptimisationLevel -&gt; ShowS)
-&gt; (OptimisationLevel -&gt; String)
-&gt; ([OptimisationLevel] -&gt; ShowS)
-&gt; Show OptimisationLevel
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [OptimisationLevel] -&gt; ShowS
$cshowList :: [OptimisationLevel] -&gt; ShowS
show :: OptimisationLevel -&gt; String
$cshow :: OptimisationLevel -&gt; String
showsPrec :: Int -&gt; OptimisationLevel -&gt; ShowS
$cshowsPrec :: Int -&gt; OptimisationLevel -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685814"><span id="local-6989586621679685816"><span id="local-6989586621679685818"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-type">OptimisationLevel</span></a></span></span></span></span><span>
</span><span id="line-232"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685808"><span id="local-6989586621679685810"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-type">OptimisationLevel</span></a></span></span></span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToOptimisationLevel"><span class="hs-identifier hs-type">flagToOptimisationLevel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-type">OptimisationLevel</span></a></span><span>
</span><span id="line-235"></span><span id="flagToOptimisationLevel"><span class="annot"><span class="annottext">flagToOptimisationLevel :: Maybe String -&gt; OptimisationLevel
</span><a href="Distribution.Simple.Compiler.html#flagToOptimisationLevel"><span class="hs-identifier hs-var hs-var">flagToOptimisationLevel</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OptimisationLevel
</span><a href="Distribution.Simple.Compiler.html#NormalOptimisation"><span class="hs-identifier hs-var">NormalOptimisation</span></a></span><span>
</span><span id="line-236"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToOptimisationLevel"><span class="hs-identifier hs-var">flagToOptimisationLevel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679685807"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685807"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ReadS Int
forall a. Read a =&gt; ReadS a
</span><a href="../../base/src/Text.Read.html#reads"><span class="hs-identifier hs-var">reads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685807"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-237"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621679685805"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685805"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-238"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685805"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">OptimisationLevel -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OptimisationLevel
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-type">OptimisationLevel</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685805"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">OptimisationLevel -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OptimisationLevel
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#OptimisationLevel"><span class="hs-identifier hs-type">OptimisationLevel</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-240"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; OptimisationLevel
forall a. Enum a =&gt; Int -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685805"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-241"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptimisationLevel
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; OptimisationLevel) -&gt; String -&gt; OptimisationLevel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Bad optimisation level: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685805"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-242"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;. Valid values are 0..2&quot;</span></span><span>
</span><span id="line-243"></span><span>  </span><span class="annot"><span class="annottext">[(Int, String)]
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; OptimisationLevel
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; OptimisationLevel) -&gt; String -&gt; OptimisationLevel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't parse optimisation level &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685807"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-246"></span><span class="hs-comment">-- * Debug info levels</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span class="hs-comment">-- | Some compilers support emitting debug info. Some have different</span><span>
</span><span id="line-250"></span><span class="hs-comment">-- levels.  For compilers that do not the level is just capped to the</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- level they do support.</span><span>
</span><span id="line-252"></span><span class="hs-comment">--</span><span>
</span><span id="line-253"></span><span id="local-6989586621679685796"><span id="local-6989586621679685797"></span></span><span class="hs-keyword">data</span><span> </span><span id="DebugInfoLevel"><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-var">DebugInfoLevel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NoDebugInfo"><span class="annot"><a href="Distribution.Simple.Compiler.html#NoDebugInfo"><span class="hs-identifier hs-var">NoDebugInfo</span></a></span></span><span>
</span><span id="line-254"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span id="MinimalDebugInfo"><span class="annot"><a href="Distribution.Simple.Compiler.html#MinimalDebugInfo"><span class="hs-identifier hs-var">MinimalDebugInfo</span></a></span></span><span>
</span><span id="line-255"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span id="NormalDebugInfo"><span class="annot"><a href="Distribution.Simple.Compiler.html#NormalDebugInfo"><span class="hs-identifier hs-var">NormalDebugInfo</span></a></span></span><span>
</span><span id="line-256"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span id="MaximalDebugInfo"><span class="annot"><a href="Distribution.Simple.Compiler.html#MaximalDebugInfo"><span class="hs-identifier hs-var">MaximalDebugInfo</span></a></span></span><span>
</span><span id="line-257"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679685788"><span id="local-6989586621679685790"><span class="annot"><span class="annottext">DebugInfoLevel
DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bounded DebugInfoLevel
forall a. a -&gt; a -&gt; Bounded a
maxBound :: DebugInfoLevel
$cmaxBound :: DebugInfoLevel
minBound :: DebugInfoLevel
$cminBound :: DebugInfoLevel
</span><a href="../../base/src/GHC.Enum.html#Bounded"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Bounded</span></a></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685755"><span id="local-6989586621679685757"><span id="local-6989586621679685761"><span id="local-6989586621679685764"><span id="local-6989586621679685766"><span id="local-6989586621679685774"><span id="local-6989586621679685780"><span id="local-6989586621679685786"><span class="annot"><span class="annottext">Int -&gt; DebugInfoLevel
DebugInfoLevel -&gt; Int
DebugInfoLevel -&gt; [DebugInfoLevel]
DebugInfoLevel -&gt; DebugInfoLevel
DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
DebugInfoLevel
-&gt; DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
(DebugInfoLevel -&gt; DebugInfoLevel)
-&gt; (DebugInfoLevel -&gt; DebugInfoLevel)
-&gt; (Int -&gt; DebugInfoLevel)
-&gt; (DebugInfoLevel -&gt; Int)
-&gt; (DebugInfoLevel -&gt; [DebugInfoLevel])
-&gt; (DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel])
-&gt; (DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel])
-&gt; (DebugInfoLevel
    -&gt; DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel])
-&gt; Enum DebugInfoLevel
forall a.
(a -&gt; a)
-&gt; (a -&gt; a)
-&gt; (Int -&gt; a)
-&gt; (a -&gt; Int)
-&gt; (a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; [a])
-&gt; (a -&gt; a -&gt; a -&gt; [a])
-&gt; Enum a
enumFromThenTo :: DebugInfoLevel
-&gt; DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
$cenumFromThenTo :: DebugInfoLevel
-&gt; DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
enumFromTo :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
$cenumFromTo :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
enumFromThen :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
$cenumFromThen :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; [DebugInfoLevel]
enumFrom :: DebugInfoLevel -&gt; [DebugInfoLevel]
$cenumFrom :: DebugInfoLevel -&gt; [DebugInfoLevel]
fromEnum :: DebugInfoLevel -&gt; Int
$cfromEnum :: DebugInfoLevel -&gt; Int
toEnum :: Int -&gt; DebugInfoLevel
$ctoEnum :: Int -&gt; DebugInfoLevel
pred :: DebugInfoLevel -&gt; DebugInfoLevel
$cpred :: DebugInfoLevel -&gt; DebugInfoLevel
succ :: DebugInfoLevel -&gt; DebugInfoLevel
$csucc :: DebugInfoLevel -&gt; DebugInfoLevel
</span><a href="../../base/src/GHC.Enum.html#Enum"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Enum</span></a></span></span></span></span></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685751"><span id="local-6989586621679685753"><span class="annot"><span class="annottext">DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool
(DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool)
-&gt; (DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool) -&gt; Eq DebugInfoLevel
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool
$c/= :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool
== :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool
$c== :: DebugInfoLevel -&gt; DebugInfoLevel -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. DebugInfoLevel -&gt; Rep DebugInfoLevel x)
-&gt; (forall x. Rep DebugInfoLevel x -&gt; DebugInfoLevel)
-&gt; Generic DebugInfoLevel
forall x. Rep DebugInfoLevel x -&gt; DebugInfoLevel
forall x. DebugInfoLevel -&gt; Rep DebugInfoLevel x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep DebugInfoLevel x -&gt; DebugInfoLevel
$cfrom :: forall x. DebugInfoLevel -&gt; Rep DebugInfoLevel x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685736"><span id="local-6989586621679685742"><span id="local-6989586621679685745"><span id="local-6989586621679685747"><span class="annot"><span class="annottext">ReadPrec [DebugInfoLevel]
ReadPrec DebugInfoLevel
Int -&gt; ReadS DebugInfoLevel
ReadS [DebugInfoLevel]
(Int -&gt; ReadS DebugInfoLevel)
-&gt; ReadS [DebugInfoLevel]
-&gt; ReadPrec DebugInfoLevel
-&gt; ReadPrec [DebugInfoLevel]
-&gt; Read DebugInfoLevel
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [DebugInfoLevel]
$creadListPrec :: ReadPrec [DebugInfoLevel]
readPrec :: ReadPrec DebugInfoLevel
$creadPrec :: ReadPrec DebugInfoLevel
readList :: ReadS [DebugInfoLevel]
$creadList :: ReadS [DebugInfoLevel]
readsPrec :: Int -&gt; ReadS DebugInfoLevel
$creadsPrec :: Int -&gt; ReadS DebugInfoLevel
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685729"><span id="local-6989586621679685731"><span id="local-6989586621679685733"><span class="annot"><span class="annottext">Int -&gt; DebugInfoLevel -&gt; ShowS
[DebugInfoLevel] -&gt; ShowS
DebugInfoLevel -&gt; String
(Int -&gt; DebugInfoLevel -&gt; ShowS)
-&gt; (DebugInfoLevel -&gt; String)
-&gt; ([DebugInfoLevel] -&gt; ShowS)
-&gt; Show DebugInfoLevel
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [DebugInfoLevel] -&gt; ShowS
$cshowList :: [DebugInfoLevel] -&gt; ShowS
show :: DebugInfoLevel -&gt; String
$cshow :: DebugInfoLevel -&gt; String
showsPrec :: Int -&gt; DebugInfoLevel -&gt; ShowS
$cshowsPrec :: Int -&gt; DebugInfoLevel -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685723"><span id="local-6989586621679685725"><span id="local-6989586621679685727"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-type">DebugInfoLevel</span></a></span></span></span></span><span>
</span><span id="line-260"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685717"><span id="local-6989586621679685719"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-type">DebugInfoLevel</span></a></span></span></span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToDebugInfoLevel"><span class="hs-identifier hs-type">flagToDebugInfoLevel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-type">DebugInfoLevel</span></a></span><span>
</span><span id="line-263"></span><span id="flagToDebugInfoLevel"><span class="annot"><span class="annottext">flagToDebugInfoLevel :: Maybe String -&gt; DebugInfoLevel
</span><a href="Distribution.Simple.Compiler.html#flagToDebugInfoLevel"><span class="hs-identifier hs-var hs-var">flagToDebugInfoLevel</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DebugInfoLevel
</span><a href="Distribution.Simple.Compiler.html#NormalDebugInfo"><span class="hs-identifier hs-var">NormalDebugInfo</span></a></span><span>
</span><span id="line-264"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToDebugInfoLevel"><span class="hs-identifier hs-var">flagToDebugInfoLevel</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679685716"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685716"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ReadS Int
forall a. Read a =&gt; ReadS a
</span><a href="../../base/src/Text.Read.html#reads"><span class="hs-identifier hs-var">reads</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685716"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-265"></span><span>  </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621679685715"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685715"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-266"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685715"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">DebugInfoLevel -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugInfoLevel
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-type">DebugInfoLevel</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span>   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685715"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">DebugInfoLevel -&gt; Int
forall a. Enum a =&gt; a -&gt; Int
</span><a href="../../base/src/GHC.Enum.html#fromEnum"><span class="hs-identifier hs-var">fromEnum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DebugInfoLevel
forall a. Bounded a =&gt; a
</span><a href="../../base/src/GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#DebugInfoLevel"><span class="hs-identifier hs-type">DebugInfoLevel</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; DebugInfoLevel
forall a. Enum a =&gt; Int -&gt; a
</span><a href="../../base/src/GHC.Enum.html#toEnum"><span class="hs-identifier hs-var">toEnum</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685715"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-269"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; DebugInfoLevel
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; DebugInfoLevel) -&gt; String -&gt; DebugInfoLevel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Bad debug info level: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679685715"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-270"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;. Valid values are 0..3&quot;</span></span><span>
</span><span id="line-271"></span><span>  </span><span class="annot"><span class="annottext">[(Int, String)]
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; DebugInfoLevel
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; DebugInfoLevel) -&gt; String -&gt; DebugInfoLevel
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Can't parse debug info level &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; ShowS
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685716"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-272"></span><span>
</span><span id="line-273"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-274"></span><span class="hs-comment">-- * Languages and Extensions</span><span>
</span><span id="line-275"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-276"></span><span>
</span><span id="line-277"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#unsupportedLanguages"><span class="hs-identifier hs-type">unsupportedLanguages</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-278"></span><span id="unsupportedLanguages"><span class="annot"><span class="annottext">unsupportedLanguages :: Compiler -&gt; [Language] -&gt; [Language]
</span><a href="Distribution.Simple.Compiler.html#unsupportedLanguages"><span class="hs-identifier hs-var hs-var">unsupportedLanguages</span></a></span></span><span> </span><span id="local-6989586621679685714"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685714"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679685713"><span class="annot"><span class="annottext">[Language]
</span><a href="#local-6989586621679685713"><span class="hs-identifier hs-var">langs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685712"><span class="hs-identifier hs-var">lang</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679685712"><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685712"><span class="hs-identifier hs-var">lang</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Language]
</span><a href="#local-6989586621679685713"><span class="hs-identifier hs-var">langs</span></a></span><span>
</span><span id="line-280"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isNothing"><span class="hs-identifier hs-var">isNothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Language -&gt; Maybe String
</span><a href="Distribution.Simple.Compiler.html#languageToFlag"><span class="hs-identifier hs-var">languageToFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685714"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685712"><span class="hs-identifier hs-var">lang</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-281"></span><span>
</span><span id="line-282"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#languageToFlags"><span class="hs-identifier hs-type">languageToFlags</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-283"></span><span id="languageToFlags"><span class="annot"><span class="annottext">languageToFlags :: Compiler -&gt; Maybe Language -&gt; [String]
</span><a href="Distribution.Simple.Compiler.html#languageToFlags"><span class="hs-identifier hs-var hs-var">languageToFlags</span></a></span></span><span> </span><span id="local-6989586621679685709"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685709"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (String -&gt; Bool) -&gt; String -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-284"></span><span>                     </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; (Maybe Language -&gt; [String]) -&gt; Maybe Language -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe String] -&gt; [String]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe String] -&gt; [String])
-&gt; (Maybe Language -&gt; [Maybe String]) -&gt; Maybe Language -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Language -&gt; Maybe String) -&gt; [Language] -&gt; [Maybe String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Language -&gt; Maybe String
</span><a href="Distribution.Simple.Compiler.html#languageToFlag"><span class="hs-identifier hs-var">languageToFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685709"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-285"></span><span>                     </span><span class="annot"><span class="annottext">([Language] -&gt; [Maybe String])
-&gt; (Maybe Language -&gt; [Language])
-&gt; Maybe Language
-&gt; [Maybe String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Language]
-&gt; (Language -&gt; [Language]) -&gt; Maybe Language -&gt; [Language]
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Language
</span><a href="Language.Haskell.Extension.html#Haskell98"><span class="hs-identifier hs-var">Haskell98</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679685703"><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685703"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-glyph">-&gt;</span><span class="hs-special">[</span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685703"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#languageToFlag"><span class="hs-identifier hs-type">languageToFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html#Language"><span class="hs-identifier hs-type">Language</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span>
</span><span id="line-288"></span><span id="languageToFlag"><span class="annot"><span class="annottext">languageToFlag :: Compiler -&gt; Language -&gt; Maybe String
</span><a href="Distribution.Simple.Compiler.html#languageToFlag"><span class="hs-identifier hs-var hs-var">languageToFlag</span></a></span></span><span> </span><span id="local-6989586621679685702"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685702"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679685701"><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685701"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Language -&gt; [(Language, String)] -&gt; Maybe String
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">Language
</span><a href="#local-6989586621679685701"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; [(Language, String)]
</span><a href="Distribution.Simple.Compiler.html#compilerLanguages"><span class="hs-identifier hs-var hs-var">compilerLanguages</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685702"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span class="hs-comment">-- |For the given compiler, return the extensions it does not support.</span><span>
</span><span id="line-292"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#unsupportedExtensions"><span class="hs-identifier hs-type">unsupportedExtensions</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-293"></span><span id="unsupportedExtensions"><span class="annot"><span class="annottext">unsupportedExtensions :: Compiler -&gt; [Extension] -&gt; [Extension]
</span><a href="Distribution.Simple.Compiler.html#unsupportedExtensions"><span class="hs-identifier hs-var hs-var">unsupportedExtensions</span></a></span></span><span> </span><span id="local-6989586621679685699"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685699"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679685698"><span class="annot"><span class="annottext">[Extension]
</span><a href="#local-6989586621679685698"><span class="hs-identifier hs-var">exts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-294"></span><span>  </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685697"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679685697"><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685697"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Extension]
</span><a href="#local-6989586621679685698"><span class="hs-identifier hs-var">exts</span></a></span><span>
</span><span id="line-295"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Maybe String) -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isNothing"><span class="hs-identifier hs-var">isNothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Extension -&gt; Maybe (Maybe String)
</span><a href="Distribution.Simple.Compiler.html#extensionToFlag%27"><span class="hs-identifier hs-var">extensionToFlag'</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685699"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685697"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="hs-keyword">type</span><span> </span><span id="CompilerFlag"><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-var">CompilerFlag</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span class="hs-comment">-- |For the given compiler, return the flags for the supported extensions.</span><span>
</span><span id="line-300"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#extensionsToFlags"><span class="hs-identifier hs-type">extensionsToFlags</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-301"></span><span id="extensionsToFlags"><span class="annot"><span class="annottext">extensionsToFlags :: Compiler -&gt; [Extension] -&gt; [String]
</span><a href="Distribution.Simple.Compiler.html#extensionsToFlags"><span class="hs-identifier hs-var hs-var">extensionsToFlags</span></a></span></span><span> </span><span id="local-6989586621679685695"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685695"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[String] -&gt; [String]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span> </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; ([Extension] -&gt; [String]) -&gt; [Extension] -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; Bool) -&gt; [String] -&gt; [String]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; (String -&gt; Bool) -&gt; String -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-302"></span><span>                       </span><span class="annot"><span class="annottext">([String] -&gt; [String])
-&gt; ([Extension] -&gt; [String]) -&gt; [Extension] -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe String] -&gt; [String]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">([Maybe String] -&gt; [String])
-&gt; ([Extension] -&gt; [Maybe String]) -&gt; [Extension] -&gt; [String]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Extension -&gt; Maybe String) -&gt; [Extension] -&gt; [Maybe String]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Extension -&gt; Maybe String
</span><a href="Distribution.Simple.Compiler.html#extensionToFlag"><span class="hs-identifier hs-var">extensionToFlag</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685695"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span class="hs-comment">-- | Looks up the flag for a given extension, for a given compiler.</span><span>
</span><span id="line-305"></span><span class="hs-comment">-- Ignores the subtlety of extensions which lack associated flags.</span><span>
</span><span id="line-306"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#extensionToFlag"><span class="hs-identifier hs-type">extensionToFlag</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span>
</span><span id="line-307"></span><span id="extensionToFlag"><span class="annot"><span class="annottext">extensionToFlag :: Compiler -&gt; Extension -&gt; Maybe String
</span><a href="Distribution.Simple.Compiler.html#extensionToFlag"><span class="hs-identifier hs-var hs-var">extensionToFlag</span></a></span></span><span> </span><span id="local-6989586621679685692"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685692"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679685691"><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685691"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Maybe String) -&gt; Maybe String
forall (m :: * -&gt; *) a. Monad m =&gt; m (m a) -&gt; m a
</span><a href="../../base/src/GHC.Base.html#join"><span class="hs-identifier hs-var">join</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Extension -&gt; Maybe (Maybe String)
</span><a href="Distribution.Simple.Compiler.html#extensionToFlag%27"><span class="hs-identifier hs-var">extensionToFlag'</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685692"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685691"><span class="hs-identifier hs-var">ext</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | Looks up the flag for a given extension, for a given compiler.</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- However, the extension may be valid for the compiler but not have a flag.</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- For example, NondecreasingIndentation is enabled by default on GHC 7.0.4,</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- hence it is considered a supported extension but not an accepted flag.</span><span>
</span><span id="line-313"></span><span class="hs-comment">--</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- The outer layer of Maybe indicates whether the extensions is supported, while</span><span>
</span><span id="line-315"></span><span class="hs-comment">-- the inner layer indicates whether it has a flag.</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- When building strings, it is often more convenient to use 'extensionToFlag',</span><span>
</span><span id="line-317"></span><span class="hs-comment">-- which ignores the difference.</span><span>
</span><span id="line-318"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#extensionToFlag%27"><span class="hs-identifier hs-type">extensionToFlag'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Language.Haskell.Extension.html#Extension"><span class="hs-identifier hs-type">Extension</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#CompilerFlag"><span class="hs-identifier hs-type">CompilerFlag</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span id="extensionToFlag%27"><span class="annot"><span class="annottext">extensionToFlag' :: Compiler -&gt; Extension -&gt; Maybe (Maybe String)
</span><a href="Distribution.Simple.Compiler.html#extensionToFlag%27"><span class="hs-identifier hs-var hs-var">extensionToFlag'</span></a></span></span><span> </span><span id="local-6989586621679685690"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685690"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679685689"><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685689"><span class="hs-identifier hs-var">ext</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Extension -&gt; [(Extension, Maybe String)] -&gt; Maybe (Maybe String)
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="annot"><span class="annottext">Extension
</span><a href="#local-6989586621679685689"><span class="hs-identifier hs-var">ext</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; [(Extension, Maybe String)]
</span><a href="Distribution.Simple.Compiler.html#compilerExtensions"><span class="hs-identifier hs-var hs-var">compilerExtensions</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685690"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- | Does this compiler support parallel --make mode?</span><span>
</span><span id="line-322"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#parmakeSupported"><span class="hs-identifier hs-type">parmakeSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-323"></span><span id="parmakeSupported"><span class="annot"><span class="annottext">parmakeSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#parmakeSupported"><span class="hs-identifier hs-var hs-var">parmakeSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support parallel --make&quot;</span></span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="hs-comment">-- | Does this compiler support reexported-modules?</span><span>
</span><span id="line-326"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#reexportedModulesSupported"><span class="hs-identifier hs-type">reexportedModulesSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-327"></span><span id="reexportedModulesSupported"><span class="annot"><span class="annottext">reexportedModulesSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#reexportedModulesSupported"><span class="hs-identifier hs-var hs-var">reexportedModulesSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support reexported-modules&quot;</span></span><span>
</span><span id="line-328"></span><span>
</span><span id="line-329"></span><span class="hs-comment">-- | Does this compiler support thinning/renaming on package flags?</span><span>
</span><span id="line-330"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#renamingPackageFlagsSupported"><span class="hs-identifier hs-type">renamingPackageFlagsSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-331"></span><span id="renamingPackageFlagsSupported"><span class="annot"><span class="annottext">renamingPackageFlagsSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#renamingPackageFlagsSupported"><span class="hs-identifier hs-var hs-var">renamingPackageFlagsSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span>
</span><span id="line-332"></span><span>  </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support thinning and renaming package flags&quot;</span></span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span class="hs-comment">-- | Does this compiler have unified IPIDs (so no package keys)</span><span>
</span><span id="line-335"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#unifiedIPIDRequired"><span class="hs-identifier hs-type">unifiedIPIDRequired</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-336"></span><span id="unifiedIPIDRequired"><span class="annot"><span class="annottext">unifiedIPIDRequired :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#unifiedIPIDRequired"><span class="hs-identifier hs-var hs-var">unifiedIPIDRequired</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Requires unified installed package IDs&quot;</span></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">-- | Does this compiler support package keys?</span><span>
</span><span id="line-339"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#packageKeySupported"><span class="hs-identifier hs-type">packageKeySupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-340"></span><span id="packageKeySupported"><span class="annot"><span class="annottext">packageKeySupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#packageKeySupported"><span class="hs-identifier hs-var hs-var">packageKeySupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Uses package keys&quot;</span></span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span class="hs-comment">-- | Does this compiler support unit IDs?</span><span>
</span><span id="line-343"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#unitIdSupported"><span class="hs-identifier hs-type">unitIdSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-344"></span><span id="unitIdSupported"><span class="annot"><span class="annottext">unitIdSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#unitIdSupported"><span class="hs-identifier hs-var hs-var">unitIdSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Uses unit IDs&quot;</span></span><span>
</span><span id="line-345"></span><span>
</span><span id="line-346"></span><span class="hs-comment">-- | Does this compiler support Backpack?</span><span>
</span><span id="line-347"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#backpackSupported"><span class="hs-identifier hs-type">backpackSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-348"></span><span id="backpackSupported"><span class="annot"><span class="annottext">backpackSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#backpackSupported"><span class="hs-identifier hs-var hs-var">backpackSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Support Backpack&quot;</span></span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-comment">-- | Does this compiler support a package database entry with:</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- &quot;dynamic-library-dirs&quot;?</span><span>
</span><span id="line-352"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#libraryDynDirSupported"><span class="hs-identifier hs-type">libraryDynDirSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-353"></span><span id="libraryDynDirSupported"><span class="annot"><span class="annottext">libraryDynDirSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#libraryDynDirSupported"><span class="hs-identifier hs-var hs-var">libraryDynDirSupported</span></a></span></span><span> </span><span id="local-6989586621679685687"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685687"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685687"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-354"></span><span>  </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-355"></span><span>      </span><span class="hs-comment">-- Not just v &gt;= mkVersion [8,0,1,20161022], as there</span><span>
</span><span id="line-356"></span><span>      </span><span class="hs-comment">-- are many GHC 8.1 nightlies which don't support this.</span><span>
</span><span id="line-357"></span><span>    </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685685"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">20161022</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685685"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span>
</span><span id="line-358"></span><span>      </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685685"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">20161021</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-359"></span><span>  </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-360"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-361"></span><span>  </span><span id="local-6989586621679685685"><span class="annot"><span class="annottext">v :: Version
</span><a href="#local-6989586621679685685"><span class="hs-identifier hs-var hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685687"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-362"></span><span>
</span><span id="line-363"></span><span class="hs-comment">-- | Does this compiler's &quot;ar&quot; command supports response file</span><span>
</span><span id="line-364"></span><span class="hs-comment">-- arguments (i.e. @file-style arguments).</span><span>
</span><span id="line-365"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#arResponseFilesSupported"><span class="hs-identifier hs-type">arResponseFilesSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-366"></span><span id="arResponseFilesSupported"><span class="annot"><span class="annottext">arResponseFilesSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#arResponseFilesSupported"><span class="hs-identifier hs-var hs-var">arResponseFilesSupported</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var">ghcSupported</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ar supports at file&quot;</span></span><span>
</span><span id="line-367"></span><span>
</span><span id="line-368"></span><span class="hs-comment">-- | Does this compiler support Haskell program coverage?</span><span>
</span><span id="line-369"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#coverageSupported"><span class="hs-identifier hs-type">coverageSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-370"></span><span id="coverageSupported"><span class="annot"><span class="annottext">coverageSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#coverageSupported"><span class="hs-identifier hs-var hs-var">coverageSupported</span></a></span></span><span> </span><span id="local-6989586621679685682"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685682"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-371"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685682"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-372"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-373"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-374"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span class="hs-comment">-- | Does this compiler support profiling?</span><span>
</span><span id="line-377"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#profilingSupported"><span class="hs-identifier hs-type">profilingSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-378"></span><span id="profilingSupported"><span class="annot"><span class="annottext">profilingSupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#profilingSupported"><span class="hs-identifier hs-var hs-var">profilingSupported</span></a></span></span><span> </span><span id="local-6989586621679685680"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685680"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-379"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685680"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-380"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-381"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-382"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span class="hs-comment">-- | Does this compiler support a package database entry with:</span><span>
</span><span id="line-385"></span><span class="hs-comment">-- &quot;visibility&quot;?</span><span>
</span><span id="line-386"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#libraryVisibilitySupported"><span class="hs-identifier hs-type">libraryVisibilitySupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-387"></span><span id="libraryVisibilitySupported"><span class="annot"><span class="annottext">libraryVisibilitySupported :: Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#libraryVisibilitySupported"><span class="hs-identifier hs-var hs-var">libraryVisibilitySupported</span></a></span></span><span> </span><span id="local-6989586621679685679"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685679"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685679"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-388"></span><span>  </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679685678"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span class="hs-special">]</span><span>
</span><span id="line-389"></span><span>  </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-390"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-391"></span><span>  </span><span id="local-6989586621679685678"><span class="annot"><span class="annottext">v :: Version
</span><a href="#local-6989586621679685678"><span class="hs-identifier hs-var hs-var">v</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Version
</span><a href="Distribution.Simple.Compiler.html#compilerVersion"><span class="hs-identifier hs-var">compilerVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685679"><span class="hs-identifier hs-var">comp</span></a></span><span>
</span><span id="line-392"></span><span>
</span><span id="line-393"></span><span class="hs-comment">-- | Utility function for GHC only features</span><span>
</span><span id="line-394"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-type">ghcSupported</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-395"></span><span id="ghcSupported"><span class="annot"><span class="annottext">ghcSupported :: String -&gt; Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#ghcSupported"><span class="hs-identifier hs-var hs-var">ghcSupported</span></a></span></span><span> </span><span id="local-6989586621679685677"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685677"><span class="hs-identifier hs-var">key</span></a></span></span><span> </span><span id="local-6989586621679685676"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685676"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-396"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; CompilerFlavor
</span><a href="Distribution.Simple.Compiler.html#compilerFlavor"><span class="hs-identifier hs-var">compilerFlavor</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685676"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-397"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHC"><span class="hs-identifier hs-var">GHC</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679685675"><span class="hs-identifier hs-var">checkProp</span></a></span><span>
</span><span id="line-398"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><a href="Distribution.Compiler.html#GHCJS"><span class="hs-identifier hs-var">GHCJS</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679685675"><span class="hs-identifier hs-var">checkProp</span></a></span><span>
</span><span id="line-399"></span><span>    </span><span class="annot"><span class="annottext">CompilerFlavor
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-400"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679685675"><span class="annot"><span class="annottext">checkProp :: Bool
</span><a href="#local-6989586621679685675"><span class="hs-identifier hs-var hs-var">checkProp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-401"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Map String String -&gt; Maybe String
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685677"><span class="hs-identifier hs-var">key</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Map String String
</span><a href="Distribution.Simple.Compiler.html#compilerProperties"><span class="hs-identifier hs-var hs-var">compilerProperties</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679685676"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-402"></span><span>            </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;YES&quot;</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-403"></span><span>            </span><span class="annot"><span class="annottext">Maybe String
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-404"></span><span>
</span><span id="line-405"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-406"></span><span class="hs-comment">-- * Profiling detail level</span><span>
</span><span id="line-407"></span><span class="hs-comment">-- ------------------------------------------------------------</span><span>
</span><span id="line-408"></span><span>
</span><span id="line-409"></span><span class="hs-comment">-- | Some compilers (notably GHC) support profiling and can instrument</span><span>
</span><span id="line-410"></span><span class="hs-comment">-- programs so the system can account costs to different functions. There are</span><span>
</span><span id="line-411"></span><span class="hs-comment">-- different levels of detail that can be used for this accounting.</span><span>
</span><span id="line-412"></span><span class="hs-comment">-- For compilers that do not support this notion or the particular detail</span><span>
</span><span id="line-413"></span><span class="hs-comment">-- levels, this is either ignored or just capped to some similar level</span><span>
</span><span id="line-414"></span><span class="hs-comment">-- they do support.</span><span>
</span><span id="line-415"></span><span class="hs-comment">--</span><span>
</span><span id="line-416"></span><span id="local-6989586621679685671"><span id="local-6989586621679685672"></span></span><span class="hs-keyword">data</span><span> </span><span id="ProfDetailLevel"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-var">ProfDetailLevel</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="ProfDetailNone"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailNone"><span class="hs-identifier hs-var">ProfDetailNone</span></a></span></span><span>
</span><span id="line-417"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="ProfDetailDefault"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailDefault"><span class="hs-identifier hs-var">ProfDetailDefault</span></a></span></span><span>
</span><span id="line-418"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="ProfDetailExportedFunctions"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailExportedFunctions"><span class="hs-identifier hs-var">ProfDetailExportedFunctions</span></a></span></span><span>
</span><span id="line-419"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="ProfDetailToplevelFunctions"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailToplevelFunctions"><span class="hs-identifier hs-var">ProfDetailToplevelFunctions</span></a></span></span><span>
</span><span id="line-420"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="ProfDetailAllFunctions"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailAllFunctions"><span class="hs-identifier hs-var">ProfDetailAllFunctions</span></a></span></span><span>
</span><span id="line-421"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span id="ProfDetailOther"><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailOther"><span class="hs-identifier hs-var">ProfDetailOther</span></a></span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-422"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679685660"><span id="local-6989586621679685663"><span class="annot"><span class="annottext">ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool
(ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool)
-&gt; (ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool)
-&gt; Eq ProfDetailLevel
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool
$c/= :: ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool
== :: ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool
$c== :: ProfDetailLevel -&gt; ProfDetailLevel -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(forall x. ProfDetailLevel -&gt; Rep ProfDetailLevel x)
-&gt; (forall x. Rep ProfDetailLevel x -&gt; ProfDetailLevel)
-&gt; Generic ProfDetailLevel
forall x. Rep ProfDetailLevel x -&gt; ProfDetailLevel
forall x. ProfDetailLevel -&gt; Rep ProfDetailLevel x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x. Rep ProfDetailLevel x -&gt; ProfDetailLevel
$cfrom :: forall x. ProfDetailLevel -&gt; Rep ProfDetailLevel x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685639"><span id="local-6989586621679685651"><span id="local-6989586621679685654"><span id="local-6989586621679685656"><span class="annot"><span class="annottext">ReadPrec [ProfDetailLevel]
ReadPrec ProfDetailLevel
Int -&gt; ReadS ProfDetailLevel
ReadS [ProfDetailLevel]
(Int -&gt; ReadS ProfDetailLevel)
-&gt; ReadS [ProfDetailLevel]
-&gt; ReadPrec ProfDetailLevel
-&gt; ReadPrec [ProfDetailLevel]
-&gt; Read ProfDetailLevel
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [ProfDetailLevel]
$creadListPrec :: ReadPrec [ProfDetailLevel]
readPrec :: ReadPrec ProfDetailLevel
$creadPrec :: ReadPrec ProfDetailLevel
readList :: ReadS [ProfDetailLevel]
$creadList :: ReadS [ProfDetailLevel]
readsPrec :: Int -&gt; ReadS ProfDetailLevel
$creadsPrec :: Int -&gt; ReadS ProfDetailLevel
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685629"><span id="local-6989586621679685631"><span id="local-6989586621679685636"><span class="annot"><span class="annottext">Int -&gt; ProfDetailLevel -&gt; ShowS
[ProfDetailLevel] -&gt; ShowS
ProfDetailLevel -&gt; String
(Int -&gt; ProfDetailLevel -&gt; ShowS)
-&gt; (ProfDetailLevel -&gt; String)
-&gt; ([ProfDetailLevel] -&gt; ShowS)
-&gt; Show ProfDetailLevel
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [ProfDetailLevel] -&gt; ShowS
$cshowList :: [ProfDetailLevel] -&gt; ShowS
show :: ProfDetailLevel -&gt; String
$cshow :: ProfDetailLevel -&gt; String
showsPrec :: Int -&gt; ProfDetailLevel -&gt; ShowS
$cshowsPrec :: Int -&gt; ProfDetailLevel -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-423"></span><span>
</span><span id="line-424"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685623"><span id="local-6989586621679685625"><span id="local-6989586621679685627"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-type">ProfDetailLevel</span></a></span></span></span></span><span>
</span><span id="line-425"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679685617"><span id="local-6989586621679685619"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-type">ProfDetailLevel</span></a></span></span></span><span>
</span><span id="line-426"></span><span>
</span><span id="line-427"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToProfDetailLevel"><span class="hs-identifier hs-type">flagToProfDetailLevel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-type">ProfDetailLevel</span></a></span><span>
</span><span id="line-428"></span><span id="flagToProfDetailLevel"><span class="annot"><span class="annottext">flagToProfDetailLevel :: String -&gt; ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#flagToProfDetailLevel"><span class="hs-identifier hs-var hs-var">flagToProfDetailLevel</span></a></span></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailDefault"><span class="hs-identifier hs-var">ProfDetailDefault</span></a></span><span>
</span><span id="line-429"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#flagToProfDetailLevel"><span class="hs-identifier hs-var">flagToProfDetailLevel</span></a></span><span> </span><span id="local-6989586621679685616"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685616"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-430"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; [(String, ProfDetailLevel)] -&gt; Maybe ProfDetailLevel
forall a b. Eq a =&gt; a -&gt; [(a, b)] -&gt; Maybe b
</span><a href="../../base/src/GHC.List.html#lookup"><span class="hs-identifier hs-var">lookup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="Distribution.Utils.Generic.html#lowercase"><span class="hs-identifier hs-var">lowercase</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685616"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-431"></span><span>                </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685614"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685613"><span class="hs-identifier hs-var">value</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-432"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679685612"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685612"><span class="hs-identifier hs-var">primary</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685611"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679685611"><span class="hs-identifier hs-var">aliases</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685613"><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685613"><span class="hs-identifier hs-var">value</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(String, [String], ProfDetailLevel)]
</span><a href="Distribution.Simple.Compiler.html#knownProfDetailLevels"><span class="hs-identifier hs-var">knownProfDetailLevels</span></a></span><span>
</span><span id="line-433"></span><span>                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679685614"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685614"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685612"><span class="hs-identifier hs-var">primary</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; [String]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679685611"><span class="hs-identifier hs-var">aliases</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-434"></span><span>      </span><span class="hs-keyword">of</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679685610"><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685610"><span class="hs-identifier hs-var">value</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685610"><span class="hs-identifier hs-var">value</span></a></span><span>
</span><span id="line-435"></span><span>         </span><span class="annot"><span class="annottext">Maybe ProfDetailLevel
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailOther"><span class="hs-identifier hs-var">ProfDetailOther</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685616"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-436"></span><span>
</span><span id="line-437"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#knownProfDetailLevels"><span class="hs-identifier hs-type">knownProfDetailLevels</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-type">ProfDetailLevel</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-438"></span><span id="knownProfDetailLevels"><span class="annot"><span class="annottext">knownProfDetailLevels :: [(String, [String], ProfDetailLevel)]
</span><a href="Distribution.Simple.Compiler.html#knownProfDetailLevels"><span class="hs-identifier hs-var hs-var">knownProfDetailLevels</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-439"></span><span>  </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;default&quot;</span></span><span class="hs-special">,</span><span>            </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>                  </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailDefault"><span class="hs-identifier hs-var">ProfDetailDefault</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-440"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;none&quot;</span></span><span class="hs-special">,</span><span>               </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>                  </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailNone"><span class="hs-identifier hs-var">ProfDetailNone</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-441"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;exported-functions&quot;</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;exported&quot;</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span>        </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailExportedFunctions"><span class="hs-identifier hs-var">ProfDetailExportedFunctions</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-442"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;toplevel-functions&quot;</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;toplevel&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;top&quot;</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailToplevelFunctions"><span class="hs-identifier hs-var">ProfDetailToplevelFunctions</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-443"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;all-functions&quot;</span></span><span class="hs-special">,</span><span>      </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;all&quot;</span></span><span class="hs-special">]</span><span class="hs-special">,</span><span>             </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailAllFunctions"><span class="hs-identifier hs-var">ProfDetailAllFunctions</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-444"></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-445"></span><span>
</span><span id="line-446"></span><span class="annot"><a href="Distribution.Simple.Compiler.html#showProfDetailLevel"><span class="hs-identifier hs-type">showProfDetailLevel</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailLevel"><span class="hs-identifier hs-type">ProfDetailLevel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-447"></span><span id="showProfDetailLevel"><span class="annot"><span class="annottext">showProfDetailLevel :: ProfDetailLevel -&gt; String
</span><a href="Distribution.Simple.Compiler.html#showProfDetailLevel"><span class="hs-identifier hs-var hs-var">showProfDetailLevel</span></a></span></span><span> </span><span id="local-6989586621679685609"><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685609"><span class="hs-identifier hs-var">dl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="#local-6989586621679685609"><span class="hs-identifier hs-var">dl</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-448"></span><span>    </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailNone"><span class="hs-identifier hs-var">ProfDetailNone</span></a></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;none&quot;</span></span><span>
</span><span id="line-449"></span><span>    </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailDefault"><span class="hs-identifier hs-var">ProfDetailDefault</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;default&quot;</span></span><span>
</span><span id="line-450"></span><span>    </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailExportedFunctions"><span class="hs-identifier hs-var">ProfDetailExportedFunctions</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;exported-functions&quot;</span></span><span>
</span><span id="line-451"></span><span>    </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailToplevelFunctions"><span class="hs-identifier hs-var">ProfDetailToplevelFunctions</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;toplevel-functions&quot;</span></span><span>
</span><span id="line-452"></span><span>    </span><span class="annot"><span class="annottext">ProfDetailLevel
</span><a href="Distribution.Simple.Compiler.html#ProfDetailAllFunctions"><span class="hs-identifier hs-var">ProfDetailAllFunctions</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;all-functions&quot;</span></span><span>
</span><span id="line-453"></span><span>    </span><span class="annot"><a href="Distribution.Simple.Compiler.html#ProfDetailOther"><span class="hs-identifier hs-type">ProfDetailOther</span></a></span><span> </span><span id="local-6989586621679685608"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685608"><span class="hs-identifier hs-var">other</span></a></span></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679685608"><span class="hs-identifier hs-var">other</span></a></span><span>
</span><span id="line-454"></span></pre></body></html>